package iliasTests;

public class MinMax
{

    public static void main(String[] args)
    {

        double[] a =
        { 1.5, 3.4, 2.3, 3.3, 2.2, 4.4, 3.5 };
        double summe, min, max;
        int anzahl = a.length;
        min = max = summe = a[0];

        for (int i = 1; i <= anzahl; i++)
        {
            if (a[i] < min)
                min = a[i];
            else if (a[i] > max)
                max = a[i];

            summe += a[i];
        }

        System.out.println("Max: " + max + ", Min: " + min + ", Summe: " + summe);
    }

}
